//
//  ViewController.m
//  LBCategory
//
//  Created by 杨庆人 on 2017/9/20.
//  Copyright © 2017年 杨庆人. All rights reserved.
//

#import "ViewController.h"
#import <LBCategory.h>
#import <UIButton+LBStyle.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, self.view.bounds.size.width, 30)];
    label.text = @"画虚线";
    [label addDashLineWithColor:[UIColor colorWithRed:226/255.0 green:226/255.0 blue:226/255.0 alpha:1.0] leftMargin:0 rightMargin:0];
    [self.view addSubview:label];
    
    
    
    
//    
//    NSLog(@"当前时间:%@",[NSString earlierTimeWithTimeInterval:[[NSDate date] dateByAddingTimeInterval:-60*60*24*30*11].timeIntervalSince1970]);
//    
//    NSLog(@"90002当前阅读数:%@",[@"90002" readCount]);
//    NSLog(@"195002当前阅读数:%@",[@"195002" readCount]);
//    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

//    [button setGradientBlueBackgroundImage];
    [button setAutoHighLightBackgroundColor:[UIColor blue]];

    [button setAutoHighLightTitleColor:[UIColor whiteColor]];
    
    [button setTitle:@"测试" forState:UIControlStateNormal];
    
    
    button.titleLabel.font = [UIFont systemFontOfSize:14];
    

    
    button.frame = CGRectMake(100, 100, 100, 30);
    
    [self.view addSubview:button];
    
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    
    //    [button setGradientBlueBackgroundImage];
    [button1 setAutoHighLightBackgroundColor:[UIColor gray]];
    
    [button1 setAutoHighLightTitleColor:[UIColor black]];
    
    [button1 setTitle:@"测试2" forState:UIControlStateNormal];
    
    button1.titleLabel.font = [UIFont systemFontOfSize:14];
    
    
    
    button1.frame = CGRectMake(100, 150, 100, 30);
    
    [self.view addSubview:button1];
    
    
//
    // Do any additional setup after loading the view, typically from a nib.

    NSString *string = @"19232332222";
    
    if ([string validateMobileNumber]) {
        NSLog(@"SHI");
    }else{
        NSLog(@"buSHI");
    }
    
    NSString *money = @"12121212";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
    
    money = @"122000000";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
    
    money = @"12121212121200";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
    
    money = @"121212121212000000";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
    
    money = @"20000000000";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
    
    money = @"12121";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
    
    money = @"1200";
    NSLog(@"-- %@ --", [NSString lb_getFormatWithMoney:money]);
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
